package com.company.management.domain.reward;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.company.management.enums.ScoreModuleType;
import lombok.Data;

import java.util.Date;
@Data
@TableName("T_Score_Level")
public class ScoreLevel {
    @TableId(type = IdType.AUTO)
    @TableField("Sid")
    private Integer sid;

    @TableField("sName")
    private String sName;
    @TableField("Flag")
    private Integer flag;
    @TableField("Score")
    private Integer score;
    @TableField("UserId")
    private Integer userId;
    @TableField("CreateDateTime")
    private Date createDateTime;
    @TableField("Module")
    private Integer module;

    public ScoreLevel buildScoreLevel(String sName,Integer score, Integer userId) {
        this.sName = sName;
        this.score = score;
        this.userId = userId;
        this.createDateTime = new Date();
        this.module = ScoreModuleType.REEARD_PUNISHMENT.getCode();
        return this;
    }
}